// 是否协同
const ONLINE_COLLABORATION_OPTIONS = [
  { value: 18913, label: '协同' },
  { value: 18914, label: '非协同' },
]
// 进货状态
const PURCHASE_STATUS_OPTIONS = [
  { label: '正常', value: 1031 },
  { label: '停止', value: 1032 },
]
// 表格表头
const TABLE_COLUMNS = [
  {
    prop: 'supplierName',
    label: '供应商名称',
  },
  {
    prop: 'supplierCode',
    label: '供应商代码',
  },
  /* {
    prop: 'supplyInfoCoverageRate',
    label: '供货信息覆盖率',
  }, */
  {
    prop: 'purchaseStatusStr',
    label: '进货状态',
  },
  {
    prop: 'mainCategories',
    label: '主营品类',
  },
  {
    prop: 'cooperationBrand',
    label: '合作品牌',
  },
  {
    prop: 'mainCommodities',
    label: '主营商品',
  },
  {
    prop: 'supplierManagerArea',
    label: '供应商管理区域',
  },
  {
    prop: 'supplierStatusStr',
    label: '供应商状态',
  },
  {
    prop: 'black',
    label: '是否拉黑',
    render: (h, { row }) => {
      if (row.black !== null) {
        return <span>{row.black == 0 ? '否' : '是'}</span>
      }
    }
  },
  {
    prop: 'eliminate',
    label: '是否淘汰',
    render: (h, { row }) => {
      if (row.eliminate !== null) {
        return <span>{row.eliminate == 0 ? '否' : '是'}</span>
      }
    }
  },
  {
    prop: 'supplierTypeName',
    label: '供应商类型',
  },
  {
    prop: 'onlineCollaborationStr',
    label: '是否协同供应商',
    width: 110
  },
  {
    prop: 'supplierLevel',
    label: '供应商等级',
  },
  {
    prop: 'supplierLinkman',
    label: '供应商联系人',
  },
  {
    prop: 'supplierPhone',
    label: '供应商电话',
  },
  {
    prop: 'registeredCapitalStr',
    label: '注册资金',
  },
  {
    prop: 'supplierAddress',
    label: '供应商地址',
  },
  {
    prop: 'invoiceTypeStr',
    label: '发票类型',
  },
  {
    prop: 'supplyAmount',
    label: '供货金额',
  },
  {
    prop: 'lastYearSupplyAmoun',
    label: '去年供货金额',
  },
  {
    prop: 'thisYearSupplyAmoun',
    label: '本年供货金额',
  },
  {
    prop: 'purchaseFrequency',
    label: '采购频次',
  },
  {
    prop: 'paymentTypeStr',
    label: '付款方式',
  },
  {
    prop: 'checkoutTimeStr',
    label: '结账时间',
  },
  {
    prop: 'checkoutPeriodStr',
    label: '结账期间',
  },
]

export {
  TABLE_COLUMNS,
  PURCHASE_STATUS_OPTIONS,
  ONLINE_COLLABORATION_OPTIONS
}
